<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<!--无数据提示 开始-->
<section th:if="${#lists.isEmpty(dataMap['list'])}" class="no-data__wrap">
    <span class="no-data-ico"></span>
    <p class="mt20"><span class="c-666">您还没有优惠券~~~</span></p>
</section>
<!--无数据提示 结束-->
<section th:if="${!#lists.isEmpty(dataMap['list'])}" class="ml20 mr20">
    <div class="row">
        <section th:each="code:${dataMap['list']}" class="col-sm-6">
            <th:block th:if="${code['coupon']}!=null">
                <div class="u-coupon__wrap">
                    <!--${row.even}? (${row.first}? 'first' : 'even') : 'odd'-->

                    <section class="u-coupon-left"   th:classappend="(${code['coupon']['endDayNum'] == 0 && code['timeType'] == 1})?'u-coupon-gqq':(${code['status']}==1 ? (${code['coupon']['type']}== 1 ? 'u-coupon-zkq' : 'u-coupon-djq'):'u-coupon-gqq')">
                        <div class="text-center pt10 pb10 pl10 pr10">
                            <section class="u-coupon-num mt10">
                                <span th:if="${code['type']}==2" class="fs18 c-fff"><i class="fa fa-cny"></i></span>
                                <strong class="fs30 c-fff" th:text="${code['coupon']['limitAtion']}"></strong>
                                <span th:if="${code['type']}==1" class="fs18 c-fff">折</span>
                            </section>
                            <section class="hLh30">
                                <span class="c-fff fs12" th:title="'【满'+${code['coupon']['minAmount']}+'元可用】'" th:text="'【满'+${code['coupon']['minAmount']}+'元可用】'"></span>
                            </section>
                        </div>
                    </section>
                    <section class="u-coupon-cont">
                        <aside th:if="${code['coupon']['endDayNum'] == 0 && code['timeType'] == 1}" class="u-coupon-overdue_ico"></aside>
                        <aside th:if="${code['status']}==5" class="u-coupon-use_ico"></aside>
                        <aside th:if="${code['status'] == 4 || code['status'] == 2 || code['status'] == 3}" class="u-coupon-coupon_cancel_ico"></aside>
                        <div class="ml20 mr10 pt10 pb10">
                            <h4 class="pt10">
                                    <span class="fs20 c-333" th:text="${code['type']}==1 ?'折扣券':'代金券'">
                                    </span>
                            </h4>
                            <section class="hLh30 mt10 ovh" onmouseover="$(this).attr('title',$(this).find('span').text().replace(/\s*/g,''));">
                                <span class="c-666">
                                    <th:block th:if="${code['settingStatus']}==1">[<a href="javascript:void(0);" class="c-info" th:attrprepend="data-coupon=${code['couponId']}">查看使用范围</a>]</th:block>
                                    <th:block th:if="${code['settingStatus']}==2" >[适用于所有商品]</th:block>
                                </span>
                            </section>
                            <section class="hLh30 ovh">
                                <span class="c-999"  th:if="${code['timeType']}!=1">
                                    <small class="c-999">永久</small>
                                </span>
                                <span class="c-999"  th:if="${code['timeType']}==1">
                                    <small class="c-999" th:text="${#strings.substring(code['beginTime'],0,16)}+'至'+${#strings.substring(code['endTime'],0,16)}"></small>
                                </span>
                            </section>
                        </div>
                        <div class="u-coupon-line_wrap"></div>
                    </section>
                </div>
            </th:block>
        </section>
    </div>
    <div data-th-replace="layout/user/user-center-page"></div>
</section>